package com.tedu.pj.goods.service;

import com.tedu.pj.goods.dao.GoodsDao;
import com.tedu.pj.goods.pojo.Goods;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author Song
 * @since 2020/9/29
 */
@Service
public class GoodsServiceImpl implements GoodsService{

    private static final Logger log= LoggerFactory.getLogger(GoodsServiceImpl.class);

    @Autowired
    GoodsDao goodsDao;

    @Override
    public List<Goods> findGoods() {
        long l = System.nanoTime();
        List<Goods> goods= goodsDao.findGoods();
        System.out.println(System.nanoTime()-l);
        log.info(String.valueOf(System.nanoTime()-l));
        return goods;
    }
}
